package com.dd.cloud.user.entity.chknowl;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "书院课程表")
public class ChknowlChVideo implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 名称
     */
    @Column(length = 32, comment = "课程名称")
    private String name;

    /**
     * 课程标题
     */
    @Column(length = 32, comment = "课程标题")
    private String title;


    /**
     * 学院
     */
    @Column(length = 32, comment = "学院")
    private String school;

    /**
     * 作者
     */
    @Column(length = 32, comment = "学院")
    private String author;


    /**
     * 课程封面
     */
    @Column(length = 512, comment = "课程封面")
    private String imgUrl;


    /**
     * 描述
     */
    @Column(length = 512, comment = "描述")
    private String introductory;

    /**
     * 状态
     */
    @Column(length = 4, comment = "状态 1.正常 -1.删除")
    private Integer status;

    /**
     * 观看次数
     */
    @Column(comment = "观看次数", defaultValue = "0")
    private Integer num;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 小节数
     */
    @TableField(exist = false)
    private List<ChknowlChVideoChapter> chknowlChVideoChapterList;

    /**
     * 首页推荐课程 1是 0否
     */
    @Column(comment = "分类id", defaultValue = "0")
    private Integer isRecommend;

    /**
     * 所属分类
     */
    @Column(comment = "所属分类")
    private Integer categoryId;


    /**
     * 总时长
     */
    @Column(comment = "视频总时长")
    private Integer totalTime;
}
